//// upload all to : neocities.org/dashboard?dir=StartRecording /////
Notes.StartRecording UPDATE 24-03-03
~~~~~~~~~~~~~~~~~~~~~~~~~~
DOWNLOAD THE FILES
~~~~~~~~~~~~~~~~~~~~~~~~~~
FILENAMES : UPLOAD / download
DND_90m.shortcut.txt
DND_Off.shortcut.txt
Notes.DND.txt
Notes.StartRecording UPDATE 24-03-03 .txt
StartAudioRecording.app.txt
StartRecording1024.plist.txt
https://bobk77.neocities.org
https://bobk77.neocities.org/StartRecording_Install.txt
FROM file, StartRecording_Install.txt, get this link to download whole ZIP file:
https://www.icloud.com/iclouddrive/00282oAj8RRKa8CXsBDhiyN9A#StartRecording1024
~~~~~~~~~~~~~~~~~~~~~~~~~~
RENAME THE FILES
~~~~~~~~~~~~~~~~~~~~~~~~~~
FILENAMES : altered SUFFIXES
DND_90m.shortcut
DND_Off.shortcut
Notes.DND.txt
Notes.StartAudioRecording.txt
StartAudioRecording.app
StartRecording1024.plist
~~~~~~~~~~~~~~~~~~~~~~~~~~
MOVE THE FILES
~~~~~~~~~~~~~~~~~~~~~~~~~~
* Move PLIST file to ~/Library/LaunchAgents/
* Move file 'StartAudioRecording.app' to ~/Library/Scripts
~~~~~~~~~~~~~~~~~~~~~~~~~~
LOAD THE PLIST
~~~~~~~~~~~~~~~~~~~~~~~~~~
TERMINAL
unset zle_bracketed_paste
launchctl unload ~/Library/LaunchAgents/StartRecording1024.plist
launchctl load ~/Library/LaunchAgents/StartRecording1024.plist
*TESTING* the PLIST & APP:
launchctl start ~/Library/LaunchAgents/StartRecording1024.plist
~~~~~~~~~~~~~~~~~~~~~~~~~~
»»» Run app first time to set up [permissions]
"StartAudioRecording app" wants access to control
"QuickTime Player.app". Allowing control will
provide access to documents and data in
"QuickTime Player.app", and to perform actions
within that app.
This workflow needs to control other applications to run.
Allow - OK
»»» Ensure Launch Agent points to
app name, StartAudioRecording.app
~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
#---# OUTLINE #---#
- at 1024
- turn off DND (for some amount of time?)
- start new audio recording with QuickTime
- notify that it has started
- at 1026
- turn ON DND (until 11:00 ... or, for 90 minutes)
#__# OUTLINE 2 #__#
#1## Disable Do Not Disturb
shortcuts run DND_Off
#2## NOTIFY USER
Display Notification ...
#3## Start Audio Recording
### AppleScript / Automator app
new audio recording
start [the recording] document
-- plus error handling; alternate scenario considerations
#4## Enable Do Not Disturb
shortcuts run DND_90m
~~~~~~~~~~~~~~~~~~~~~~~~~~
-- QuickTime Player Suite :: DICTIONARY INFO
new audio recording
new audio recording {v} : Create a new audio recording document.
new audio recording
→ document : The new audio recording document.
start [the recording] document
start: Start the [movie] recording.
start document : the recording to start
~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###
### USEFUL IDEA perhaps ... not yet implemented ? ###
###
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tell application "QuickTime Player"
activate
try
set frontDoc to front document
close front document -- ###### ! ! !
on error err number errNum
if errNum is -1719 then
-- There is no open document
-- ###################### !!
--
else if errNum is -10000 then
-- Front doc exists, but does not really...
else
log err
end if
end try
open aFile
play front document
-- Hide QTP
tell application "System Events"
keystroke "h" using command down
end tell
end tell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#### ####
#### BETTER IDEA FOR WEDNESDAY EVE: ####
#### ####
#### -- make a *new* PLIST, just for Wed. eve. ####
#### ####
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
for: Wednesday Teaching Series ::
CREATE NEW StartRecordingNNNN.plist
Copy, Paste; Modify:
~~~~~~~~~~~~~~~~~~~~~~~~~~
for: Wednesday Teaching Series ::
UNDER StartCalendarInterval,
ADD a new section :
Weekday
3
Hour
19
Minute
00
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Contents of StartAudioRecording app
#
# the AppleScript within StartAudioRecording app
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- StartAudioRecording.scpt
tell application "QuickTime Player"
activate
-- get name of document 1
--
-- in case QT is already running,
-- and in case "New Audio Recording" has
-- already been executed manually by user
--
try
set docName to name of document 1
if docName = "Untitled" then
--
-- the existence of document 1 named "Untitled"
-- means that a recording was started, stopped,
-- and was waiting to be saved.
--
set newAudioRecording to new audio recording
start newAudioRecording
end if
-- OTHERWISE,
-- there probably exists a document 1 named "Audio Recording"
-- means that "New Audio Recording" has
-- already been executed manually by user.
-- and so that document can be "started" [recording]
tell document docName
start
end tell
on error
-- the most likely error is ...
-- that there is no document window, so
-- when trying to get name of document 1, it errors
--
-- and so, we can start at the beginning,
-- by opening a new audio recording
-- and giving that document a name, and
-- telling that document to 'start'.
try
set new_recording to (new audio recording)
tell new_recording
start
end tell
end try
end try
end tell